package string;

import java.util.Arrays;

public class WordsSplit {
    public static void main(String[] args) {
        String s = "hello world sSs a";
        String[] words = s.split(" ");
        System.out.println(Arrays.toString(words));

        for (String w : words) {
//            String prefix = w.substring(0, 1);
            String prefix = (w.charAt(0) + "").toUpperCase();
            System.out.println(prefix + w.substring(1).toLowerCase());
        }
    }
}
